//
//  UIBarButton+Extensions.swift
//  chendong微博
//
//  Created by chen dong on 2021/3/30.
//

import UIKit

extension UIBarButtonItem{
    
    /// 创建 UIBarButtonItem
    /// - Parameters:
    ///   - title: <#title description#>
    ///   - fontSize: <#fontSize description#>
    ///   - target: <#target description#>
    ///   - action: <#action description#>
    convenience init(title: String,fontSize: CGFloat = 16, target:AnyObject?, action: Selector) {
        
        let btn: UIButton = UIButton()
        
        btn.addTarget(target, action: action, for: .touchUpInside)
        btn.setImage(UIImage(named: ""), for: .highlighted)
        //self.init 实例化 UIBarButtonItem
        self.init(customView: btn)
        
        
    }
}





